layui.use(['form','layer','util','table'],function (){
    let form = layui.form,layer = layui.layer,util = layui.util,table = layui.table;
})

/**
* @author: ChengJW
* @params:
* @return:
* @date: 2021/11/11
* @description: 反显受理信息
*/
$(function (){
    //反显受理信息
    initShowCompanyInfo();
});

function initShowCompanyInfo() {
    let ciCreditCode = getValue("ciCreditCode");
    let jsonData = {
        "qryReqFir" : ciCreditCode
    }
    layui.table.render({
        elem:'#dataTable',
        id:'dataTableId',
        url:'/showCompanyInfo/queryArchivesInfoListByCreditCode',
        parseData:function (result) {
            return{
                "code":result.code,
                "msg":result.msg,
                "count":result.data.pageCount,
                "data":result.data.list
            }
        },
        size:'sm',
        //分页的起止页号，每页条数
        page:{
            curr:1,
            limit:15,
            limits:[15,30,50,100]
        },
        //自定义的页码参数名称、每页条数参数名称
        request:{
            pageName:'pageNum',
            limitName:'pageSize'
        },
        //table的高度
        height:500,
        //查询条件，json格式
        where:jsonData,
        cols:[[
            {type:'numbers',title:'序号'},
            {field:'ciRegistId',title:'注册号',templet:function (d) {
                    return valueIsEqual(d.ciBrowCd,'0') ? d.ciRegistId : "<span style='color: red;'>" +d.ciRegistId+ "</span>"
                }},
            {field:'ciCreditCode',title:'统一社会信用代码'},
            {field:'ciNm',title:'企业名称',width:300},
            {field:'ciPripalNm',title:'法人',width: 80},
            {field:'ciMgeNm',title:'管辖机关'},
            {field: 'ciArchTpye',title:'档案类型',width: 100},
            {field: 'ciAresTolNum',title:'页数',width:70,templet:function (d) {
                    return d.ciAresTolNum + '页';
                }},
            {field:'ciCheckDt',title:'核准日期',width:90,templet:function (d) {
                    return layui.util.toDateString(d.ciRegistDt,"yyyy-MM-dd");
                }}
        ]],
        //头部工具条
        toolbar: '#totalToolBar',
    });
}